home *** CD-ROM | disk | FTP | other *** search
/ Apple Developer Connection 1998 Fall: Game Toolkit / Disc.iso / Samples / Moofwars 1.02 / MoofWars Sprocket / •Headers / TShotSprite.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-11-05  |  1.5 KB  |  70 lines  |  [TEXT/CWIE]

  1. /*************************************************************************************
  2. TShotSprite.h
  3.  
  4. This class represents any shots in the game, friendly or enemy.
  5.  
  6. Author: Timothy Carroll
  7. Apple Developer Technical Support
  8. timc@apple.com
  9.  
  10. Modification History: 
  11.  
  12. 8/15/96        TMC     Initial Release
  13.  
  14. Copyright © 1996 Apple Computer, Inc., All Rights Reserved
  15.  
  16.  
  17. You may incorporate this sample code into your applications without
  18. restriction, though the sample code has been provided "AS IS" and the
  19. responsibility for its operation is 100% yours.  However, what you are
  20. not permitted to do is to redistribute the source as "DSC Sample Code"
  21. after having made changes. If you're going to re-distribute the source,
  22. we require that you make it clear in the source that the code was
  23. descended from Apple Sample Code, but that you've made changes.
  24.  
  25. *************************************************************************************/
  26.  
  27.  
  28. #ifndef _TSHOTSPRITE_
  29. #define _TSHOTSPRITE_
  30.  
  31. #pragma once
  32.  
  33. #include "TSprite.h"
  34.  
  35. #if PRAGMA_STRUCT_ALIGN
  36. #pragma options align=power
  37. #endif
  38.  
  39.  
  40. struct TShotSpriteData
  41. {
  42.     TSpriteData spriteData;
  43.     SInt16        duration;
  44. };
  45.  
  46. class TShotSprite : public TSprite
  47. {
  48.     public:
  49.     
  50.     enum {
  51.         kSpriteType = 'SHOT'
  52.     };
  53.     
  54.     TShotSprite (TShotSpriteData *data);
  55.     ~TShotSprite (void);
  56.     
  57.     virtual void ProcessSprite (void);
  58.     virtual void Collision (TSprite *theSprite);
  59.     
  60.     protected:
  61.     
  62.     SInt16 fDuration;
  63.     
  64. };
  65.  
  66. #if PRAGMA_STRUCT_ALIGN
  67. #pragma options align=reset
  68. #endif
  69.  
  70. #endif /* _TSHOTSPRITE_ */